﻿@model vnMcdonald.Models.Product

@{
    ViewBag.Title = "Thêm sản phẩm";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>THÊM SẢN PHẨM MỚI</h2>
<section id="inner-box">
    @using (Html.BeginForm("ProductCreate", "Admin", FormMethod.Post, new { @encType = "multipart/form-data" })) {
    
        <ul class="button">
            <li><input type="submit" id="btnluu" value="Lưu lại" /></li>
            <li><a id="back" href="@Url.Action("Products", "Admin")" title="Trở về"><img src="~/Content/admin/images/go_back.png" alt="Trở về" />Trờ về</a></li>
            <li><a id="refresh" href="" title="Tải lại"><img src="~/Content/admin/images/refresh-icon.png" alt="Tải lại" />Tải lại</a></li>
        </ul>
        <div id="inner">

            @Html.ValidationSummary(true)
            @Html.ValidationMessage("info_err")
            <div class="editor-field">
                <label for="category">Danh mục</label>
                @Html.DropDownList("loadcategory")
            </div>
            <div class="editor-field">
                @Html.LabelFor(model => model.Name)
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
            <div class="editor-field">
                @Html.LabelFor(model => model.Price)
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
            <div class="editor-field">
            <label class="lbimg">Hình ảnh </label>
            <div id="img-field">
                <input type="file" id="imageproduct" name="imageproduct" multiple="multiple" />
                @Html.ValidationMessage("error")<br />
                Có thể chọn nhiều hình ảnh<br />
                Dung lượng tối đa: <strong>2M</strong> <br />
                Chỉ hổ trợ ảnh có đuổi mở rộng <strong>jpg,png,gif</strong>.
                
            </div>
        </div>
        <div class="clear"></div>
            <div class="editor-field">
                @Html.LabelFor(model => model.Description)
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>
    }
</section>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
@*<script type="text/javascript">
    CKEDITOR.replace('Description', { height: 300 });
</script>*@

